From ce021b0df555c32f4c18ec2534f8f5b8c88e9066 Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Sun, 1 Dec 2013 23:14:59 +1300 Subject: [PATCH] libxl: remove unsigned less-than-0 comparison ...from libxl_cpuid_parse_config_xend. value is unsigned so this doesn't work, and either way the following comparison on it being bigger than 3 does what was intended here anyway. Coverity-ID: 1055614 Signed-off-by: Matthew Daley Acked-by: Ian Jackson --- tools/libxl/libxl_cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl_cpuid.c b/tools/libxl/libxl_cpuid.c index e1c406c540..dd21b78864 100644 --- a/tools/libxl/libxl_cpuid.c +++ b/tools/libxl/libxl_cpuid.c @@ -298,7 +298,7 @@ int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid, } value = str[1] - 'a'; endptr = strchr(str, '='); - if (value < 0 || value > 3 || endptr == NULL) { + if (value > 3 || endptr == NULL) { return 4; } str = endptr + 1; -- 2.30.2